package com.neuqsoft.rd.citizen.thirdapp.demo.api;

import com.neuqsoft.rd.citizen.thirdapp.demo.dto.OrderResultDTO;
import com.neuqsoft.rd.citizen.thirdapp.demo.service.Scene2Service;
import com.neuqsoft.rd.citizen.thirdapp.sdk.dto.NeuqOrderStateRsp;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 线下被扫支付
 *
 * @author baidh
 * @date 2020/12/02
 */
@Api(tags = "扫码入园-收费")
@RestController
@RequestMapping("/api/scene2/")
public class Scene2Api {

    @Autowired
    Scene2Service service;

    @PostMapping("/pay")
    public OrderResultDTO codePay(@RequestParam String authCode) {
        return service.codePay(authCode);
    }

    @GetMapping("/pay/state")
    public NeuqOrderStateRsp tradeState(@RequestParam String bizNo) {
        return service.tradeState(bizNo);
    }

}
